package edu.xmut.builder.improve;

/**
 * @author 朔风
 * @date 2024-02-19 15:27
 */
public class HouseDirector {

    HouseBuilder houseBuilder = null;

    public HouseDirector() {
    }

    public HouseDirector(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public void setHouseBuilder(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public House constructHouse() {
        houseBuilder.buildBasic();
        houseBuilder.buildWalls();
        houseBuilder.roofed();
        return houseBuilder.build();
    }


}
